package com.fenghongzhang.sample

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.fenghongzhang.sample.listview.SampleListViewActivity
import com.fenghongzhang.sample.recycleview.SampleRecycleViewActivity
import com.fenghongzhang.sample.recycleview2.SampleRecycleView2Activity
import kotlinx.android.synthetic.main.activity_main.*

/**
 *
 */
class MainActivity : AppCompatActivity() , View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        sample_listView.setOnClickListener(this)
        sample_RecycleView.setOnClickListener(this)
        sample_RecycleView2.setOnClickListener(this)

    }

    override fun onClick(v: View?) {
        when(v?.id){
            R.id.sample_listView ->
                SampleListViewActivity.launch(this)
            R.id.sample_RecycleView ->
                SampleRecycleViewActivity.launch(this)
            R.id.sample_RecycleView2 ->
                SampleRecycleView2Activity.launch(this)
        }
    }
}
